Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wallet connect - sake.lido.fi dApp - staking transaction gets stuck #16348

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

saledjenic
Copy link
Contributor

@saledjenic saledjenic requested review from alaibe, alexjba, virginiabalducci, anastasiyaig and a team and removed request for a team September 16, 2024 17:24
maxFeePerGas = hexToGwei(tx.maxFeePerGas)
maxPriorityFeePerGas = hexToGwei(tx.maxPriorityFeePerGas)

// TODO: check why we need to set gasPrice here and why if it's not checked we cannot send the tx and fees are unknown????
gasPrice = hexToGwei(tx.maxFeePerGas)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why gasPrice is used in this context (refer to TODO in the line above)?

@@ -36,15 +36,15 @@ template getProp(obj: JsonNode, prop: string, value: var typedesc[uint64]): bool

template getProp(obj: JsonNode, prop: string, value: var typedesc[string]): bool =
var success = false
if (obj.kind == JObject and obj.contains(prop)):
if (obj.kind == JObject and obj.contains(prop) and obj[prop].kind == JString):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All functions in this file should have this check and obj[prop].kind == .... but when I did that I couldn't start the app (got crash) which undoubtedly means that in some places we have incorrect type usage or receiving incorrect json data. That should be fixed in another PR.

@status-im-auto
Copy link
Member

status-im-auto commented Sep 16, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 18d570a #1 2024-09-16 17:31:26 ~6 min tests/nim 📄log
✔️ 18d570a #1 2024-09-16 17:32:57 ~8 min macos/aarch64 🍎dmg
✔️ 18d570a #1 2024-09-16 17:36:52 ~12 min tests/ui 📄log
✔️ 18d570a #1 2024-09-16 17:40:25 ~15 min macos/x86_64 🍎dmg
✔️ 18d570a #1 2024-09-16 17:40:33 ~16 min linux-nix/x86_64 📦tgz
✔️ 18d570a #1 2024-09-16 17:43:26 ~18 min linux/x86_64 📦tgz

@status-im-auto
Copy link
Member

Copy link

@virginiabalducci virginiabalducci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the staking tx works on my end

@@ -484,13 +484,11 @@ SQUtils.QObject {

// Beware, the tx values are standard blockchain hex big number values; the fees values are nim's float64 values, hence the complex conversions
if (!!tx.maxFeePerGas && !!tx.maxPriorityFeePerGas) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we are ine post eip1559 case, both are present, we do not need to set gas price i believe

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly, that was my question about, here.

Copy link
Contributor

@alexjba alexjba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@saledjenic saledjenic merged commit ea8827e into master Sep 17, 2024
9 checks passed
@saledjenic saledjenic deleted the fix/issue-16096 branch September 17, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wallet connect - Sake.lido.fi dApp - Staking transaction gets stuck
5 participants